package cn.seecoder.ai.dao;

import cn.seecoder.ai.enums.DeploymentStateEnum;
import cn.seecoder.ai.model.po.Deployment;
import cn.seecoder.ai.model.vo.DeploymentVO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Optional;

public interface DeploymentRepository extends JpaRepository<Deployment, Integer>, JpaSpecificationExecutor<Deployment> {
    List<Deployment> findByUserId(Integer userId);


    List<Deployment> findByUserIdAndModelId(Integer userId, Integer modelId);


    List<Deployment> findByDeploymentState(DeploymentStateEnum success);
}